﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Common;

namespace Fuxi
{
    public partial class FuxiType:IPlayer
    {
        public double BankRoll { get; set; }
        public string PlayerID { get; set; }
        IDealer Dealer;
        public DecisionPointInfo F {get;set;}
        public HandInfo H { get; set; }
        StrategyType strategy;
        double winOdds;
        int outs;
        bool drawing, isOppCallingStation;
        public FuxiType(IDealer dealer)
        {
            PlayerID = G.FuxiPlayerID;
            Dealer = dealer;
            Dealer.NewHandStarted += Dealer_NewHandStarted;
            Dealer.DecisionPoint += Dealer_DecisionPoint;
        }
        public void Dealer_NewHandStarted(Object sender, EventArgs e)
        {
            drawing = false;
            //isOppCallingStation = IsOppCallingStation();
            H = Dealer.AllHands[Dealer.AllHands.Count - 1];
           // strategy = GetHandStrategy();
        }

        public void Dealer_DecisionPoint(Object sender, DecisionEventArgs e)
        {
            if (e.PlayerID == G.FuxiPlayerID)
            {
                //if (e.CurrentInfo.CanCall)
                //{
                //    e.Decision = DecisionType.Call;
                //}
                //else if (e.CurrentInfo.CanCheck)
                //{
                //    e.Decision = DecisionType.Check;
                //}
                //else
                {
                    e.Decision = DecisionType.Fold;
                }
            }
            //F = Dealer.CurrentInfo;
            //if (ShouldStatRaise)
            //{
            //    ExecuteRaise();
            //}
            //else
            //{
            //    winOdds = HandEvaluator.GetWinOdds(H.MyPocket, F.Board, 10000);
            //    strategy = GetHandStrategy();
            //    if (F.Round == G.Preflop)
            //    {

            //        MakePreflopDecision();
            //    }
            //    else if (F.Round == G.Flop)
            //    {
            //        MakeFlopDecision();
            //    }
            //    else if (F.Round == G.Turn)
            //    {
            //        MakeTurnDecision();
            //    }
            //    else if (F.Round == G.River)
            //    {
            //        MakeRiverDecision();
            //    }
            //}
        }
    }
}
